package com.ygq.seckill.vo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * 返回各种信息的枚举类
 */

@Getter
@ToString
@AllArgsConstructor
public enum RespBeanEnum {

    //通用
    SUCCESS(200, "SUCCESS"),
    ERROR(500, "服务器异常"),

    //登录
    LOGIN_ERROR(500210, "用户id或者密码错误"),
    UPDATE_PASSWORD_FAIL(500214, "密码修改失败"),
    BIND_ERROR(500212, "参数绑定异常"),
    MOBILE_ERROR(500211, "手机号格式不正确"),
    MOBILE_NO_EXIST(500213, "手机号不存在"),
    //秒杀模块
    ENTRY_STOCK(500500, "库存不足，秒杀失败"),
    REQUEST_ILLEGAL(500503, "请求非法"),
    SESSION_ERROR(500502, "用户信息有误,请重新登录"),
    SEC_KILL_WAIT(500504, "您正在排队中....请耐心等待:）"),
    CAPTCHA_ERROR(500505,"验证码错误或验证码已过期"),
    ACCESS_LIMIT_REACHED(500506,"访问频繁,请待会再试..."),
    SEC_KILL_RETRY(500507,"本次抢购失败,请重新抢购.."),
    REPEAT_ERROR(500501, "该商品每人限购一件");

    private final Integer code;
    private final String message;
}
